package com.jrx.anytxn.transaction.job.dailyAccount.step;

import com.jrx.anytxn.transaction.mapper.ext.ExtBtDailyAccountListMapper;
import org.springframework.batch.core.JobExecution;
import org.springframework.batch.core.JobExecutionListener;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

/**
 * 日终T24核心汇总记账初始化监听
 * 清空初始化数据
 *
 * @Author yhy
 * @Date 2023/4/28 15:41
 */
@Service
public class DailyAccountInitListener implements JobExecutionListener {

    @Resource
    private ExtBtDailyAccountListMapper extBtDailyAccountListMapper;

    @Override
    public void beforeJob(JobExecution jobExecution) {
        extBtDailyAccountListMapper.deleteAll();
    }

    @Override
    public void afterJob(JobExecution jobExecution) { }
}
